<?php
/*
 *      Redistribution and use in source and binary forms, with or without
 *      modification, are permitted provided that the following conditions are
 *      met:
 *      
 *      * Redistributions of source code must retain the above copyright
 *        notice, this list of conditions and the following disclaimer.
 *      * Redistributions in binary form must reproduce the above
 *        copyright notice, this list of conditions and the following disclaimer
 *        in the documentation and/or other materials provided with the
 *        distribution.
 *      * Neither the name of the  nor the names of its
 *        contributors may be used to endorse or promote products derived from
 *        this software without specific prior written permission.
 *      
 *      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *      "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *      LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 *      A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 *      OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 *      SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 *      LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 *      DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 *      THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 *      (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 *      OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
$this->config['var.namespaces'] = array('ti');
$this->config['var.start_time'] = microtime();
$this->config['var.language']   = 'en';
$this->config['var.language.variant'] = 'us';
$this->config['var.pre_request']   = array();
$this->config['var.post_request']  = array();
$this->config['var.pre_template']  = array();
$this->config['var.post_template'] = array();


$this->config['var.timezone'] = 'Etc/UTC';
date_default_timezone_set($this->config['var.timezone']);
$this->config['var.time'] = $this->config['var.start_time'];
$this->config['var.date'] = getdate();

$this->config['var.php.version'] = explode('.',phpversion().'');
$this->config['var.php.major'] = $this->config['var.php.version'][0];
$this->config['var.php.minor'] = $this->config['var.php.version'][1]; 
$this->config['var.php.patch'] = $this->config['var.php.version'][2];
$this->config['var.php.version'] = $this->config['var.php.version'][0].'.'.$this->config['var.php.version'][1];
$this->config['var.date_type'] = 'timestamp';
$this->config['var.last_form'] = null;

# configure the log types
$this->config['log.types'] = array(
	'default'=>'/tmp/titanium.log',
);
$this->config['log.handles'] = array();

$this->config['template']        = 'template';
$this->config['template.layout'] = 'default';
$this->config['template.datatable.max_rows'] = 15;
$this->config['template.js']     = array(
	'ti/js/ti.js'=>true,
	'ti/js/ti.tab.js'=>true,
	'ti/js/ti.rules.js'=>true,
	'ti/js/ti.datatable.js'=>true,
	'ti/js/ti.x.js'=>true,
	'ti/js/ti.ajax.js'=>true,
	'ti/js/ti.forms.js'=>true,
	'ti/js/animation.compressed.js'=>true,
);
$this->config['template.css'] = array(
	'ti/css/reset.css'=>true,
	'ti/css/tags.css' =>true,
	'ti/css/forms.css'=>true,
	'ti/css/misc.css'=>true,
	'ti/css/panels.css'=>true,
	'ti/css/stock_bgs.css'=>true,
	'ti/css/calendar.css'=>true,
	'ti/css/datatable.css'=>true,
);

$this->config['database.functions'] = array(
	'pgsql'=>array(
		'connect'=>'pg_connect',
		'query'=>'pg_query',
		'fetch_assoc'=>'pg_fetch_assoc',
		'fetch_array'=>'pg_fetch_array',
		'num_fields'=>'pg_num_fields',
		'num_rows'=>'pg_num_rows',
		'seek'=>'pg_result_seek',
		'escape'=>'pg_escape_string',
	),
	'mysql'=>array(
		'connect'=>'mysql_connect',
		'query'=>'mysql_query',
		'fetch_assoc'=>'mysql_fetch_assoc',
		'fetch_array'=>'mysql_fetch_array',
		'num_fields'=>'mysql_num_fields',
		'num_rows'=>'mysql_num_rows',
		'seek'=>'mysql_result_seek',
		'escape'=>'mysql_escape_string',
	),
);


$this->swap['head']   = '';
$this->swap['title']  = '';
$this->swap['center'] = '';
?>